home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / SuperiorCanfield.dxr / playing cards_60_t hot.ls < prev    next >
Encoding:
Text File  |  2002-01-25  |  2.3 KB  |  73 lines

  1. property spriteNum, row, fp
  2. global tableau, equal, currentsel, getlist, godlist, basecard, foundation, extras, dimpos
  3.  
  4. on beginSprite me
  5.   row = determinerow()
  6.   candd = [#one: 37, #two: 51, #thr: 65, #fou: 79]
  7.   fp = candd[row]
  8. end
  9.  
  10. on determinerow me
  11.   if spriteNum = 93 then
  12.     return #one
  13.   else
  14.     if spriteNum = 94 then
  15.       return #two
  16.     else
  17.       if spriteNum = 95 then
  18.         return #thr
  19.       else
  20.         if spriteNum = 96 then
  21.           return #fou
  22.         end if
  23.       end if
  24.     end if
  25.   end if
  26. end
  27.  
  28. on mouseEnter me
  29.   if getlist <> VOID then
  30.     if (tableau[row].getcardcount() < 14) and ((tableau[row].getcardcount() + extras.count) <= 14) then
  31.       if tableau[row].getcardcount() > 0 then
  32.         if extras.count = 0 then
  33.           if (getlist.getlastcard().rankvalue = (tableau[row].getlastcard().rankvalue - 1)) and (getlist.getlastcard().suitcolor <> tableau[row].getlastcard().suitcolor) then
  34.             equal = 1
  35.             godlist = tableau[row]
  36.             currentsel = tableau[row].getlastcard().spnum + 1
  37.           else
  38.             if (getlist.getlastcard().rank = "king") and (tableau[row].getlastcard().rank = "ace") and (getlist.getlastcard().suitcolor <> tableau[row].getlastcard().suitcolor) then
  39.               equal = 1
  40.               godlist = tableau[row]
  41.               currentsel = tableau[row].getlastcard().spnum + 1
  42.             end if
  43.           end if
  44.         else
  45.           if (getlist.cards[dimpos].rankvalue = (tableau[row].getlastcard().rankvalue - 1)) and (getlist.cards[dimpos].suitcolor <> tableau[row].getlastcard().suitcolor) then
  46.             equal = 1
  47.             godlist = tableau[row]
  48.             currentsel = tableau[row].getlastcard().spnum + 1
  49.           else
  50.             if (getlist.cards[dimpos].rank = "king") and (tableau[row].getlastcard().rank = "ace") and (getlist.cards[dimpos].suitcolor <> tableau[row].getlastcard().suitcolor) then
  51.               equal = 1
  52.               godlist = tableau[row]
  53.               currentsel = tableau[row].getlastcard().spnum + 1
  54.             end if
  55.           end if
  56.         end if
  57.       else
  58.         if extras.count = 0 then
  59.           equal = 1
  60.           godlist = tableau[row]
  61.           currentsel = fp
  62.         end if
  63.       end if
  64.     end if
  65.   end if
  66. end
  67.  
  68. on mouseLeave me
  69.   equal = 0
  70.   currentsel = 0
  71.   godlist = VOID
  72. end
  73.